

public class SearchTreeTest {
	public static void main(String[] args) throws NodeNFException {

		SearchTree<Integer> u = new SearchTree<Integer>();
		SearchTree<Integer> reog;
		u.insert(4);	
		u.insert(2);
		u.insert(6);
		u.insert(8);
		u.insert(9);
		u.insert(7);
		u.insert(5);
		u.insert(3);
		u.insert(1);
		
		System.out.println("In Order :\t"+ u.inOrder());		
		System.out.println("Level Order :\t"+u.levelOrder());
		System.out.println("Post Order :\t" + u.postOrder());
		System.out.println("Pre Order :\t" +u.preOrder());
		System.out.println("Height: "+ u.height()+ "  Size: " + u.size() + "  Leaves: "+ u.leaves()); 
		System.out.println("---- REORGANISATION ----");
		System.out.println(u.inOrderList() + " "+ u.inOrderList().size());
		reog = u.reorganize();
		System.out.println("In Order :\t"+ reog.inOrder());		
		System.out.println("Level Order :\t"+reog.levelOrder());
		System.out.println("Post Order :\t" + reog.postOrder());
		System.out.println("Pre Order :\t" +reog.preOrder());
		System.out.println("Height: "+ reog.height()+ "  Size: " + reog.size() + "  Leaves: "+ reog.leaves()); 

		
		

	}
}
